package com.huawei.appmarket.support.thirdprovider;

import android.content.ContentProvider;
import android.content.ContentValues;
import android.content.UriMatcher;
import android.database.Cursor;
import android.net.Uri;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.util.Locale;
import o.ccx;
import o.Logger;

public class OfflinePolicySignProvider extends ContentProvider {
    private static final UriMatcher ˏ = new UriMatcher(-1);

    static {
        ˏ.addURI("com.huawei.appmarket.offlinepolicysign.provider", "policysign", 1);
    }

    public boolean onCreate() {
        return false;
    }

    @Nullable
    public Cursor query(@NonNull Uri uri, @Nullable String[] strArr, @Nullable String str, @Nullable String[] strArr2, @Nullable String str2) {
        return null;
    }

    @Nullable
    public String getType(@NonNull Uri uri) {
        return null;
    }

    @Nullable
    public Uri insert(@NonNull Uri uri, @Nullable ContentValues contentValues) {
        return null;
    }

    public int delete(@NonNull Uri uri, @Nullable String str, @Nullable String[] strArr) {
        return 0;
    }

    public int update(@NonNull Uri uri, @Nullable ContentValues contentValues, @Nullable String str, @Nullable String[] strArr) {
        if (1 == ˏ.match(uri)) {
            ˎ(contentValues);
        } else {
            Logger.ˋ("OfflinePolicySignProvider", "No match uri");
        }
        return 0;
    }

    private void ˎ(@Nullable ContentValues contentValues) {
        if (contentValues == null) {
            Logger.e("OfflinePolicySignProvider", "values is null");
            return;
        }
        boolean booleanValue = contentValues.getAsBoolean("isAgree").booleanValue();
        Logger.ˎ("OfflinePolicySignProvider", String.format(Locale.ENGLISH, "is Agree:%s countryCode:%s", new Object[]{Boolean.valueOf(booleanValue), contentValues.getAsString("countryCode")}));
        ccx.ˎ(r1, booleanValue);
    }
}
